package com.epam.menuItems;

import java.util.HashMap;

public class Invoker {
	private HashMap<String, ComandMenu> comandMap=new HashMap<String,ComandMenu>();
	public Invoker(CommandMgr commandmgr){
		comandMap.put("exit", new ExitMenu(commandmgr));
		comandMap.put("yryry", new Yryry(commandmgr));
		comandMap.put("bygaga", new Bygaga(commandmgr));
	}
	public void invoke(String comand){
		System.out.println("Invoke");
		comandMap.get(comand).execute();
	}
}
